package capimClientP;

import sun.jkernel.Mutex;

public class Cap_in {
	public static int localPort = 8911;
	public static SendPackets sendToNetwork;
	public static MessageInterface postOffice;
	public static ClientInterface client;
	public static ReceivePacks listenNetwork;
	
	/**
	 * @param args hostname for server and UDP port to connect
	 */
	public static void main(String[] args) {
		if(args.length != 2) {
			System.out.println("Incorrect use. Try java Cap_in server_hostname server_udp_port");
		} else {
			postOffice = new MessageInterface();
			listenNetwork = new ReceivePacks(localPort);
			sendToNetwork = new SendPackets(args);
			client = new ClientInterface(args, localPort);
			// sendToNetwork.startConnection();
			
		}
	}

}
